# def shi():
#     print('举头望明月,低头思故乡')
#
# shi()

# def add():
#     a = 3
#     b = 5
#     s = a + b
#     print(s)
#     return a
#
# c = add()
# print(c)


# def add(a,b):
#     print(a + b)
#
# add(1,3)
#
# a = 1
# b = 3
# add(a,b)
#
# add(2*3,4*5)
#
# c = 3
# add(8,c*3)

# def score(a,b,c):
#     print('张三成绩为',a)
#     print('李四成绩为',b)
#     print('王五成绩为',c)
#
# score(85,92,81)


def favf(*fru):
    print('我喜欢的水果有：')
    for i in fru:
        print(i)


favf('苹果')
favf('苹果', '梨')
favf('苹果', '梨', '桃子', '橘子', '芒果', '香蕉', '菠萝', '西瓜')


# 参数的值大于等于2,如果声明函数的时候有其他形参，通常会把可变长参数放到最后
def show(a, b, *l):
    print(a)
    print(b)
    print(l)


show(1, 2, 4, 5, 6, 7, 9, 56)


def re(a, b, c, d):
    return a + b, c * d, a - c


ss = re(1, 2, 3, 4)
print(ss)



变量的作用域
def fun():
    a = 20
    return a

a = 10
print(a)
print(fun())